<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %>
<jsp:useBean id="insert" class="bean.replybean"></jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" contentType="text/html; charset=utf-8">
<title>回复插入</title>
</head>
<body>
<%
     String name     =(String)session.getAttribute("username");
     String subject  =(String)session.getAttribute("subject");
     String reply    =request.getParameter("reply");
     SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     Date date=new Date();
     String time=df.format(date);
      try{
       
    	  if(insert.insertreply(name ,subject,time,reply)){
    		  out.println("回复成功 ！");
              out.println("<a href='shownote.jsp'>返回查看留言页面</a>");
    	    }else{
    	    	out.println("回复失败 ！");
    	         out.println("<a href='shownote.jsp'>返回查看留言页面</a>");
    	    }     
      }catch(Exception ex)
      {
        ex.printStackTrace();
      }
     %>
     
</body>
</html>